<?php

use yii\helpers\Html;
use yii\grid\GridView;
use yii\widgets\Pjax;
/* @var $this yii\web\View */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = Yii::t('app', 'Categories');
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="category-index">

<div class="col-md-12">
    <h1><?= Html::encode('文章类型') ?></h1>

    <p>
        <?= Html::a(Yii::t('app', '添加新类型'), ['create'], ['class' => 'btn btn-success']) ?>
    </p>

</div>
<?php
    echo $this->render('/layouts/menu');
?>
<div class="col-md-10 container-left">
<?php Pjax::begin(); ?>    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'columns' => [
            ['class' => 'yii\grid\SerialColumn'],

//            'id',
            'name',
//            'createat',

            [
                'class' => 'yii\grid\ActionColumn',
                'template' =>'{update}{delete}'
            ],
        ],
    ]); ?>
<?php Pjax::end(); ?></div>


</div>